System Design core concepts cheat sheet
Good design
- scalability
- maintainability
- efficiency
- reliability
Key elements
- moving data
- storing data
- transforming data
CAP or Brewer's theorem
you can only have two of the three at the same time, where can we afford to compromise?
- consistency
- availability
- partition tolerance
Speed
- throughput
- server - RPS
- database - QPS
- data - B/s
- latency
- how long it takes to handle a single request
API design
- defining inputs (product details from a seller)
- defining outputs (information when user queries for a product)
- set rate limiter and CORS
Caching
- browser
- server
- database
- CDN
Resources
- vertical "scale up"
- single machine/service resources
- horizontal "scale out"
- add more machines/instances
Databases
- scaling
- database sharding into smaller chunks
- data replication
- performance
- caching
- indexing
- query optimization